<template>
  <div class="app">
    <!-- 左侧菜单 -->
    <div class="left-sidebar">
      <aside class="sidebar">
        <div><img src="@/assets/logo.svg" style="width: 230px;margin: 10px;height: 76px;border-radius: 10px; "></div>
        <nav class="menu">
          <ul>
            <li>
              <router-link to="/studyDesktop" class="icon-text-block">
                <el-icon><Files /></el-icon>
                <i>{{ $t('App.menu-items.studyDesktop') }}</i>
              </router-link>
            </li>
            <li>
              <router-link to="/study-plan" class="icon-text-block">
                <el-icon><Edit /></el-icon>
                <i>{{ $t('App.menu-items.studyPlan') }}</i>
              </router-link>
            </li>
            <li>
              <router-link to="/note-management" class="icon-text-block">
                <el-icon><Notebook /></el-icon>
                <i>{{ $t('App.menu-items.noteManagement') }}</i>
              </router-link>
            </li>
            <li>
              <router-link to="/question-answer" class="icon-text-block">
                <el-icon><ChatLineSquare /></el-icon>
                <i>{{ $t('App.menu-items.questionAnswer') }}</i>
              </router-link>
            </li>
            <li>
              <router-link to="/translation" class="icon-text-block">
                <el-icon><Connection /></el-icon>
                <i>{{ $t('App.menu-items.translation') }}</i>
              </router-link>
            </li>
          </ul>
        </nav>
      </aside>
    </div>

    <!-- 右侧内容 -->
    <div class="right-content">
      <div class="top-sidebar">
        <input
          type="text"
          :placeholder="$t('App.top-sidebar.searchPlaceholder')"
          class="search-bar"
        />
        <div class="user-settings">
          <span>
            <router-link to="/setting" class="icon-text-block no-style">
              <div class="setting-icon">
                <el-icon :size="20"><Setting /></el-icon>
              </div>
              <div class="setting-text">{{ $t('App.top-sidebar.user-settings.settings') }}</div>
            </router-link>
          </span>
          <span>
            <router-link to="/user" class="icon-text-block no-style">
              <div class="setting-icon">
                <el-icon :size="20"><User /></el-icon>
              </div>
              <div class="setting-text">{{ $t('App.top-sidebar.user-settings.user') }}</div>
            </router-link>
          </span>
          <span>
            <a href="http://localhost:4200" target="_blank" class="icon-text-block no-style">
              <div class="setting-icon">
                <img :src="snakeIcon" alt="休息" style="width: 20px; height: 20px;" />
              </div>
              <div class="setting-text">休息一下</div>
            </a>
          </span>
        </div>
      </div>

      <!-- 内容 -->
      <div class="content">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue';
import avatar from './assets/avatar.jpg';
import snakeIcon from './assets/Snake.svg';

export default {
  name: 'App',
  setup() {
    const circleUrl = ref(avatar);

    return {
      circleUrl,
      snakeIcon
    };
  },
};
</script>

<style scoped>
@import '/src/css/base.css';
@import './css/App.css';
</style>
